package study.ct.com.retrofitmodule.service;

import java.util.Map;

import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import study.ct.com.retrofitmodule.bin.BookSearchResponse;
import study.ct.com.retrofitmodule.bin.TvLoginOk;

/**
 * Created by ct on 2017/9/26 0026.
 */

public interface TvService {


    //@FormUrlEncoded 将会自动将请求参数的类型调整为application/x-www-form-urlencoded，  FormUrlEncoded不能用于Get请求
    //@FormUrlEncoded
    @Headers({"Content-Type: application/json","Accept: application/json"})//需要添加头
    @POST("stock/userService/login")
    Call<TvLoginOk> login(@Body RequestBody fields);
}
